package com.hulk.ratel.notify.interceptor;



import lombok.extern.slf4j.Slf4j;

import org.springframework.core.annotation.Order;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* @author cmt  
* @E-mail:29572320@qq.com
* @version Create on:  2017年4月12日 下午2:18:39
* Class description
*/

@Slf4j
@Order(2)
public class LimitInterceptor extends HandlerInterceptorAdapter {


    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
            throws Exception {

       log.debug("LimitInterceptor.postHandle");
        return super.preHandle(request, response, handler);
    }

    @Override
    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
                           ModelAndView modelAndView) throws Exception {
        log.debug("LimitInterceptor.postHandle");
    }

    @Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
            throws Exception {
        log.debug("LimitInterceptor.afterCompletion", ex);
    }

}
